package com.pojo;

import com.auto.annotation.AutoCode;
import com.auto.annotation.Column;
import com.auto.annotation.MyFunction;
import com.auto.annotation.Table;

import java.io.Serializable;

/**
 * 用户信息
 * 这个不要开启isOverride会造成毁灭性打击
 * @author CFQ
 */
@AutoCode(isOverride = false, showWay = "list")
@Table(name = "PM_USER")
public class UserInfo implements Serializable {
	/**
	 *
	 */
	private static final long serialVersionUID = 47138820556225178L;
	/**
	 * 用户编号【用于登录】
	 */
	@Column(flag = "primary", treeId = true, autoGenneral = true, treecolumn = true, jsname = "用户账号", jswidth = 150, jsAllowBlank = false, jsValidator = true, keyWordFilte = true)
	private String userid;

	/**
	 * 用户电话
	 */
	@Column(jsname = "联系电话", jsAllowBlank = false, jswidth = 150, keyWordFilte = true)
	private String phone;
	/**
	 * 邮件地址
	 */
	@Column(jsname = "邮件地址", jsAllowBlank = false, jswidth = 150, keyWordFilte = true)
	private String email;
	/**
	 * 用户名称
	 */
	@Column(oth = "NOT NULL", jsname = "用户名称", jsAllowBlank = false, jswidth = 150, keyWordFilte = true)
	private String username;

	/**
	 * 助记码
	 */
	@Column(keyWordFilte=true)
	private String zjm;

	/**
	 * 用户密码
	 */
	@Column(oth = "NOT NULL", jsname = "登录密码", jsAllowBlank = false, jswidth = 150, jshidden = true)
	private String password;
	/**
	 * 是否启用
	 * 1 启用  2 锁定
	 */
	@Column(defaultValue = "1", jsname = "锁定状态", render = "function(v){if(v=='1'){return '<span style=\"color:green\"><b>正常</b></span>';}else {return '<span style=\"color:red\"><b>锁定</b></span>';}}",
			jsxtype = "radiogroup [items:[{"
					+ "inputValue: '1',"
					+ "boxLabel: '允许登录',"
					+ "anchor  : '60%',"
					+ "name  : 'enable',"
					+ "checked: true"
					+ "}, {"
					+ "inputValue: '-1',"
					+ "anchor  : '60%',"
					+ "name  : 'enable',"
					+ "boxLabel: '锁定账户'"
					+ "}]]")
	private String enable;

	/**
	 * 生日
	 */
	@Column(jsname = "生日日期", jsAllowBlank = false, jswidth = 150, keyWordFilte = true)
	private String birthday;
	/**
	 * 身份证号
	 */
	@Column(jsname = "身份证号", jswidth = 150,keyWordFilte = true)
	private String idcard;
	/**
	 * 性别
	 */
	@Column(jsname = "人员性别", jsAllowBlank = false, jswidth = 150)
	private String sex;
	/**
	 * 人员岗位
	 */
	@Column(jsname = "人员岗位", jsAllowBlank = false, jswidth = 150)
	private String post;
	/**
	 * 人员类型
	 */
	@Column(jsname = "人员类型", jsAllowBlank = false, jswidth = 150)
	private String userstyle;

	/**
	 * 人员状态
	 */
	@Column(jsname = "人员状态", jsAllowBlank = false, jswidth = 150)
	private String userstatus;
	/**
	 * 入职时间
	 */
	@Column(jsname = "入职时间", jsAllowBlank = false, jswidth = 150)
	private String entrytime;
	/**
	 * 所属部门
	 */
	@Column(oth = "NOT NULL")
	private String deptid;

	/**
	 * 所属公司单位
	 */
	@Column(oth = "NOT NULL")
	private String companyid;


	//======================GETTERS && SETTERS=================//


	public String getZjm() {
		return zjm;
	}

	public void setZjm(String zjm) {
		this.zjm = zjm;
	}

	public String getCompanyid() {
		return companyid;
	}

	public void setCompanyid(String companyid) {
		this.companyid = companyid;
	}

	public String getDeptid() {
		return deptid;
	}

	public void setDeptid(String deptid) {
		this.deptid = deptid;
	}

	public String getUsername() {
		return username;
	}

	public void setUsername(String username) {
		this.username = username;
	}

	public String getUserid() {
		return userid;
	}

	public void setUserid(String userid) {
		this.userid = userid;
	}

	public String getPassword() {
		return password;
	}

	public void setPassword(String password) {
		this.password = password;
	}

	public String getEnable() {
		return enable;
	}

	public void setEnable(String enable) {
		this.enable = enable;
	}

	@Override
	public String toString() {
		return "Userid:" + userid + ",username:" + username + ",password:" + password + ",enable:" + enable;
	}
}
